package io.kiki.sba.registry.store.api.repository;

import io.kiki.sba.registry.common.model.appmeta.InterfaceMapping;
import io.kiki.sba.registry.store.api.multi.MultiDataCenterListener;

import java.util.Date;
import java.util.Map;
import java.util.Set;


public interface InterfaceAppsRepository extends MultiDataCenterListener {

    /**
     * get revisions by interfaceName
     */
    InterfaceMapping getAppNames(String dataInfoId);

    void register(String appName, Set<String> interfaceNames);

    void renew(String interfaceName, String appName);

    int cleanDeleted(Date beforeTime, int limit);

    void startSynced();

    void waitSynced();

    long getDataVersion();

    Map<String, Map<String, InterfaceMapping>> allServiceMapping();
}
